home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0125-Object Casting Clar-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-20  |  932 b   |  25 lines  |  [TEXT/GEOL]

  1. Item    9336129                         18-Oct-89        10:05
  2.  
  3. From:   D0220                           American Zettler, Dirk Tjossen,PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    Object Casting Clarification
  8.  
  9. I have studied this topic endlessly and now admit I need assistance. In the MPW
  10. Pascal manual (p.222), it states:
  11.     "Which particular version of an overridden method is executed
  12.     when a method call is executed depends on the type of the object,
  13.     not the type of the reference variable."
  14.  
  15. Yet the TSortedList.Compare method override example in MacApp Version 2.0ß9
  16. release manual (MacApp 2.0 Feature Overview, pp.7-8) expressly states:
  17.     "Note that item1 and item2 must be cast from type TObject to
  18.     their actual type."
  19.  
  20. The two references seem to be contradictory. Why would a cast be required in
  21. the TSortedList example? What subtle point(s) am I missing here?
  22.  
  23. Dirk A. Tjossem
  24.  
  25.